
GS(2022)3124号 - 甲测资字1100471
'
},
initialize: function(t) {
T.setOptions(this, t),
this.gI = {}
},
onAdd: function(t) {
t.cE = this,
this.Ow = T._Q.s("div", "tdt-control-copyright"),
T.oq && T.oq.iT(this.Ow);
for (var i in t.hW)
t.hW[i].VE && this.BE(t.hW[i].VE());
return this.Oe(),
this.Ow
},
HI: function(t) {
return this.options.GI = t,
this.Oe(),
this
},
BE: function(t) {
return t ? (this.gI[t] || (this.gI[t] = 0),
this.gI[t]++,
this.Oe(),
this) : this
},
NE: function(t) {
return t ? (this.gI[t] && (this.gI[t]--,
this.Oe()),
this) : this
},
Oe: function() {
if (this.jE) {
var t = [];
for (var i in this.gI)
this.gI[i] && t.push(i);
var n = [];
this.options.GI && n.push(this.options.GI),
t.length && n.push(t.join(", ")),
this.Ow.innerHTML = n.join(" | ")
}
}
}),
T.Map.n({
cE: !0
}),
T.Map._(function() {
this.options.cE && (new T.Control.fI).addTo(this)
}),
T.oI.Ue = function(t) {
return new T.Control.fI(t)
}
,
T.Control.Copyright = T.Control.fI.extend({
options: {
position: T_ANCHOR_BOTTOM_RIGHT,
GI: ""
},
initialize: function(t) {
T.setOptions(this, t),
this.hI = []
},
addCopyright: function(t) {
if (this.hI["str" + t.id])
return void alert("copyright id 重复");
this.hI.push(t),
this.hI["str" + t.id] = t;
var i = T._Q.s("div", "tdt-control-copyright");
T.oq && T.oq.iT(i),
i.innerHTML = t.content,
t._span = i,
this.Ow.appendChild(i);
var n = this.jE.getCenter();
this.JI(n)
},
removeCopyright: function(t) {
this.Ow.removeChild(this.hI["str" + t.id]._span),
this.hI["str" + t.id] = null;
for (var i = 0; i < this.hI.length; i++)
if (this.hI[i].id == t.id) {
this.hI.splice(i, 1);
break
}
},
JI: function(t) {
if (this.jE) {
if (t instanceof T.dq)
var i = t;
else
var i = t.target.getCenter();
for (var n = 0; n < this.hI.length; n++)
this.hI[n].bounds && (this.hI[n].bounds.contains(i) ? "none" == this.hI[n]._span.style.display && (this.hI[n]._span.style.display = "") : this.hI[n]._span.style.display = "none")
}
},
getCopyright: function(t) {
return this.hI["str" + t]
},
getCopyrightCollection: function() {
return this.hI
},
onAdd: function(t) {
return this.jE = t,
t.cE = this,
this.Ow = T._Q.s("div", "tdt-control-copyright"),
T.oq && T.oq.iT(this.Ow),
this.Oe(),
this.jI = t.on("move", this.JI, this),
this.Ow
},
onRemove: function(t) {
T._Q.Qq(this.Ow),
this.Ow = null,
t.off("move"),
this.jI = null
}
}),
T.Control.DataSources = T.Control.extend({
options: {
position: T_ANCHOR_BOTTOM_LEFT
},
initialize: function(t) {
T.setOptions(this, t),
this.dataSources = new T.DataSources
},
onAdd: function(t) {
return this.jE = t,
this.Ow = T._Q.s("div", "tdt-control-datasources"),
T.oq && T.oq.iT(this.Ow),
this.Ow.innerHTML = '